import matplotlib.pyplot as plt
score=[1,11,111,1111,2,222,22,2222,3,33,333,3333,4,44,444,4444,5,55,555,5555,
       6,66,666,6666,7,77,777,7777,8,88,888,8888,9,99,999,999]
plt.rcParams['font.sans-serif']=['SimHei']
plt.xlabel(' 分数')
plt.ylabel('学生数量')
plt.title('学生数学成绩分布直方图')
plt.hist(score,bins=range(0,1000,10), facecolor='blue',edgecolor='red')
plt.show()